package com.woniuxy.personal.core.mapper;

import com.woniuxy.personal.core.model.PlOrderitem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.personal.core.vo.PlOrderitemDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gmx
 * @since 2021-06-29
 */
public interface PlOrderitemMapper extends BaseMapper<PlOrderitem> {

    @Select("select * from pl_orderitem where order_id=#{value}")
    List<PlOrderitem> selectOrderItem(int order_id);

    @Select("select * from pl_orderitem where store_id = #{storeId}")
    List<PlOrderitemDto> selectManey(int storeId);

    @Select("select distinct name from pl_orderitem where store_id = #{storeId}")
    List<String> selectName(int storeId);

    @Select("select sell_price from pl_orderitem where name = #{s}")
    List<Double> selectByname(String s);

    @Select("select distinct order_id from pl_orderitem where store_id = #{storeId}")
    List<Integer> selectOrder(int storeId);
}
